# -*- coding:utf-8 -*-

# zzh_admin_role
adminRoleFieldMap = {
    'roleId': 'role_id',
    'roleName': 'role_name',
    'roleType': 'role_type',
    'roleDesc': 'role_desc',
    'roleIsSys': 'role_is_sys'
}

# admin_menu
adminMenuFieldMap = {
    'menuId': 'menuId',
    'menuParentId': 'menu_parent_id',
    'menuType': 'menu_type',
    'menuTitle': 'menu_title',
    'menuIcoUrl': 'menu_ico_url',
    'menuLinkUrl': 'menu_link_url',
    'menuSort': 'menu_sort',
    'isLock': 'is_lock',
    'remark': 'remark',
    'actionKey': 'action_key',
    'isSys': 'is_sys'
}

# view_role_menu
viewRoleMenuFieldMap = {
    'roleId': 'role_id',
    'roleName': 'role_name',
    'roleType': 'role_type',
    'roleDesc': 'role_desc',
    'roleIsSys': 'role_is_sys',
    'id': 'id',
    'menuId': 'menuId',
    'menuParentId': 'menu_parent_id',
    'menuType': 'menu_type',
    'menuTitle': 'menu_title',
    'menuIcoUrl': 'menu_ico_url',
    'menuLinkUrl': 'menu_link_url',
    'menuSort': 'menu_sort',
    'isLock': 'is_lock',
    'remark': 'remark',
    'actionKey': 'action_key',
    'isSys': 'is_sys'
}

# zzh_admin_log 映射
adminLogFieldMap = {
    'id': 'id',
    'userId': 'user_id',
    'userName': 'user_name',
    'userIp': 'user_id',
    'actionType': 'action_type',
    'logRemark': 'log_remark',
    'logAddTime': 'log_add_time'
}

# view_dept 映射
viewDeptFieldMap = {
    'deptId': 'dept_id',
    'deptName': 'dept_name',
    'deptPcode': 'dept_pcode',
    'deptCode': 'dept_code',
    'deptIsLock': 'dept_is_lock',
    'deptSort': 'dept_sort',
    'deptAddress': 'dept_address',
    'leveCode': 'leve_code',
    'provinceId': 'province_id',
    'cityId': 'city_id',
    'districtId': 'district_id',
    'deptUrl': 'dept_url',
    'desUrl': 'des_url',
    'extractFrom': 'extract_from',
    'levelName': 'level_name',
    'provinceName': 'province_name',
    'cityName': 'city_name',
    'districtName': 'district_name'
}

"""
zzh_item

"""
itemFieldMap = {
    'itemId': 'item_id',
    'deptId': 'dept_id',
    'itemHandlerName': 'item_handlername',
    'itemHandlerPhone': 'item_handlerphone',
    'itemTitle': 'item_title',
    'itemPriceRange': 'item_pricerange',
    'itemContent': 'item_content',
    'itemUrl': 'item_url',
    'itemDeadline': 'item_deadline',
    'itemPublishdate': 'item_publishdate',
    'itemAddress': 'item_address',
    'itemStatus': 'item_status',
    'serviceId': 'service_id',
    'itemEnterPerson': 'item_enter_person',
    'itemEnterTime': 'item_enter_time',
    'checkStatusOne': 'check_status_one',
    'checkRemarkone': 'check_remark_one',
    'checkPersonOne': 'check_person_one',
    'checkTimeOne': 'check_time_one',
    'checkStatusTwo': 'check_status_two',
    'checkRemarkTwo': 'check_ramark_two',
    'checkPersonTwo': 'check_person_two',
    'checkTimeTwo': 'check_time_two'
}


"""
表名：zzh_url_manage

说明：url 管理表
"""

urlManageRequestFieldMap = {
    'id':'id',
    'levelCode':'level_code',
    'deptUrl':'dept_url',
    'desUrl':'des_url',
    'evidenceUrl':'evidence_url',

    'faceKeywords':'face_keywords',
    'oppositeKeywords':'opposite_keywords',
    'checkStatus':'check_status',
    'balanceStatus':'balance_status',
    'checkTime':'check_time',

    'provinceId':'province_id',
    'cityId':'city_id',
    'districtId':'district_id',
    'enterPerson':'enter_person',
    'enterTime':'enter_time',

    'checkRemark':'check_remark',
    'checkPerson':'check_person',
    'deptStatus':'dept_status'
}



"""
视图
url_manage_view
具体字段含义请参考
zzh_database_V2.1.html

"""
viewUrlManageResuestFieldMap = {
    'id':'id',
    'levelCode':'level_code',
    'deptName':'dept_name',
    'deptUrl':'dept_url',
    'desUrl':'des_url',

    'evidenceUrl':'evidence_url',
    'faceKeywords':'face_keywords',
    'oppositeKeywords':'opposite_keywords',
    'checkStatus':'check_status',
    'balanceStatus':'balance_status',

    'checkTime':'check_time',
    'provinceId':'province_id',
    'cityId':'city_id',
    'districtId':'district_id',
    'enterPerson':'enter_person',

    'enterTime':'enter_time',
    'checkRemark':'check_remark',
    'checkPerson':'check_person',
    'deptStatus':'dept_status',
    'provinceName':'province_name',

    'cityName':'city_name',
    'districtName':'district_name',
    'LeveLId':'level_id',
    'LeveLName':'level_name'
}


"""
表名：zzh_user_recharge

说明：用户充值表
"""
userRechargeMap = {
    "id":"id",
    "userId":"user_id",
    "userName":"user_name",
    "rechargeNumber":"recharge_no",
    "paymentId":"payment_id",

    "amount":"amount",
    "status":"status",
    "creatTime":"create_time",
    "completeTime":"complete_time"
}


"""
表名：zzh_user_oauth

说明：OAuth授权用户信息表
"""
userOauthMap = {
    "id":"id",
    "userId":"user_id",
    "userName":"user_name",
    "oauthName":"oauth_name",
    "oauthAccessToken":"oauth_access_token",

    "oauthOpenId":"oauth_openid",
    "addTime":"add_time"
}


"""
表名：zzh_user_oaurh_app

说明：OAuth应用表
"""
userOAuthAppMap = {

    "id":"id",
    "appTitle":"app_title",
    "appImgUrl":"app_img_url",
    "appId":"app_id",
    "appKey":"app_key",

    "remark":"remark",
    "appSort":"app_sort",
    "appIsLock":"app_is_lock",
    "apiPath":"api_path"
}



"""
表名：zzh_user_login_log

说明：用户登录日志表
"""
userLoginLogMap = {

    "id":"id",
    "userId":"user_id",
    "userName":"user_name",
    "loginTime":"login_time",
    "loginIp":"login_ip",

    "remark":"remark",
    "loginType":"login_type"
}


"""
表名：zzh_user_group

说明：会员组（VIP 跟注册会员）
"""
userGroupMap = {

    "id":"group_id",
    "groupName":"group_name",
    "groupDes":"group_des",
    "groupLogo":"group_logo",
    "groupStatus":"group_status",

    "groupCreateTime":"group_creat_time",
    "groupFee":"group_groupfee"
}


"""
表名：zzh_user_code

说明：用户随机码表
"""
userCodeMap = {
    "id":"group_id",
    "userId":"user_id",
    "userName":"user_name",
    "type":"type",
    "stringCode":"str_code",

    "count":"count",
    "status":"status",
    "userIp":"user_ip",
    "effTime":"eff_time",
    "creatTime":"create_time"
}

"""
表名：zzh_user
说明：登录用户表
"""
userMap ={
    "userId":"user_id",
    "userName":"user_name",
    "userSalt":"user_salt",
    "userPassword":"user_password",
    "userPhone":"user_phone",

    "userEmail":"user_email",
    "userAvatar":"user_avatar",
    "userNickName":"user_nick_name",
    "userStatus":"user_status",
    "userRegTime":"user_reg_time",
    "userRegIp":"user_reg_ip"
}



"""
表名：zzh_ueser_amount_log

说明：会员金额日志表
"""
userAmountLogMap ={
    "id":"id",
    "userId":"user_id",
    "userName":"user_name",
    "paymentId":"payment_id",
    "value":"value",

    "reamrk":"reamrk",
    "creatTime":"create_time"
}



"""
表名：zzh_share

说明：分享表
"""
shareMap ={
    "shareId":"user_id",
    "userId":"user_id",
    "userName":"user_name",
    "shareContent":"share_content",
    "shareAddTime":"share_addtime",

    "sharePrivacy":"share_privacy",
    "shareCommentCount":"share_commentcount",
    "shareStatus":"share_status"
}

"""
表名：zzh_service

说明：服务表
"""

serviceRequestFieldMap = {
    'serviceId': 'service_id',
    'serviceName': 'service_name',
    'serviceCode': 'service_code',
    'servicePrice': 'service_price',
    'serviceRate': 'service_rate',

    'serviceStatus': 'service_status',
    'serviceContent': 'service_content',
    'serviceContract': 'service_contract',
    'serviceStartDate': 'service_startdate',
    'serviceEndDate': 'service_enddate'
}



"""
表名：zzh_report_cart

说明：申报车表

"""
reportMap = {
    'carId': 'cart_id',
    'itemId': 'item_id',
    'userId': 'user_id',
    'carStatus': 'cart_status'
}


"""
表名：zzh_province

说明：省份表
"""
provinceMap ={
    'provinceId': 'province_id',
    'provinceName': 'province_name',
    'provinceDateCreated': 'province_datecreated',
    'provinceDateUpdated': 'province_dateupdated'
}


"""
表名：zzh_point_log

说明：会员积分日志表
"""

pointLogMap = {
    'id': 'id',
    'userId': 'user_id',
    'userName': 'username',
    'pointItemName': 'point_item_name',
    'pointValue': 'point_value',

    'remark': 'remark',
    'isIncome': 'is_income',
    'createTime': 'create_time'
}

"""
表名：zzh_point_items

说明：会员积分项目表
"""
pointItemsMap = {
    'pointItemId': 'point_item_id',
    'pointItemName': 'point_item_name',
    'isPerDay': 'is_per_day',
    'pointItemPoint': 'point_item_point',
    'pointItemRemark': 'point_item_remark',

    'pointItemSort': 'point_item_sort'
}


"""
表名：zzh_payment

说明：支付类型表
"""
paymentMap = {
    'paymentId': 'payment_id',
    'paymentName': 'payment_name',
    'paymentImgUrl': 'payment_img_url',
    'paymentRemark': 'payment_remark',
    'paymentType': 'payment_type',

    'paymentPoundageType': 'payment_poundage_type',
    'paymentPoundageAmount': 'payment_poundage_amount',
    'paymentSort': 'payment_sort',
    'paymentIsLock': 'payment_is_lock',
    'paymentApiPath': 'payment_api_path'
}


"""
表名：zzh_order_log

说明：订单操作历史表
"""
orderLogMap = {
    'orderLogId': 'order_log_id',
    'orderId': 'order_id',
    'userId': 'user_id',
    'orderActionCode': 'order_action_code',
    'orderActionDate': 'order_action_date',

    'orderRemark': 'order_remark'
}

"""
表名：zzh_order

说明：订单表
"""
orderMap = {
    'order_id': 'order_id',
    'order_no': 'order_no',
    'order_ip': 'order_ip',
    'order_type': 'order_type',
    'trade_no': 'trade_no',

    'user_id': 'user_id',
    'user_name': 'user_name',
    'payment_id': 'payment_id',
    'payment_fee': 'payment_fee',
    'payment_status': 'payment_status',

    'payment_time': 'payment_time',
    'order_created_time': 'order_created_time',
    'is_invoice': 'is_invoice',
    'invoice_title': 'invoice_title',
    'invoice_taxes': 'invoice_taxes',

    'payable_amount': 'payable_amount',
    'real_amount': 'real_amount',
    'order_amount': 'order_amount',
    'order_point': 'order_point',
    'is_member': 'is_member',

    'member_name': 'member_name',
    'member_email': 'member_email',
    'member_telephone': 'member_telephone',
    'member_province': 'member_province',
    'member_city': 'member_city',

    'member_district': 'member_district',
    'member_address': 'member_address',
    'is_coupon': 'is_coupon',
    'coupon_name': 'coupon_name',
    'coupon_code': 'coupon_code',

    'coupon_type': 'coupon_type',
    'coupon_conditions': 'coupon_conditions',
    'coupon_discount': 'coupon_discount',
    'service_content': 'service_content',
    'service_contract': 'service_contract',

    'service_code': 'service_code',
    'service_name': 'service_name',
    'service_price': 'service_price',
    'service_rate': 'service_rate',
    'item_name': 'item_name',

    'item_content': 'item_content',
    'item_url': 'item_url',
    'item_address': 'item_address',
    'item_publishdate': 'item_publishdate',
    'item_deadline': 'item_deadline',

    'item_handlername': 'item_handlername',
    'item_handlerphone': 'item_handlerphone',
    'dept_id': 'dept_id',
    'order_status': 'order_status',
    'order_product_is_success': 'order_product_is_success',
    'order_message':'order_message'
}

"""
表名：zzh_message

说明：消息盒子
"""
messageMap = {
    'messageId': 'message_id',
    'messageType': 'message_type',
    'postId': 'post_id',
    'postName': 'post_name',
    'acceptId': 'accept_id',

    'acceptName': 'accept_name',
    'messageIsRead': 'message_is_read',
    'messageTitle': 'message_title',
    'messageContent': 'message_content',
    'messagePostTime': 'message_post_time',
    'messageReadTime': 'message_read_time',
    'isLock': 'isLock'
}

"""
表名：zzh_member

说明：会员信息表（包含个人和单位）
"""
memberMap = {
    'memberId': 'member_id',
    'userId': 'user_id',
    'invited_code': 'invited_code',
    'member_code': 'member_code',
    'member_name': 'member_name',

    'member_email': 'member_email',
    'member_points': 'member_points',
    'member_balance': 'member_balance',
    'member_expired': 'member_expired',
    'industry_id': 'industry_id',

     'province_id': 'province_id',
    'city_id': 'city_id',
    'district_id': 'district_id',
    'member_favorite_count': 'member_favorite_count',
    'member_address': 'member_address',

    'member_busness': 'member_busness',
    'member_type': 'member_type',
    'sp_knowledge': 'sp_knowledge',
    'sp_revenue': 'sp_revenue',
    'sp_employee': 'sp_employee',

     'sp_industrycode': 'sp_industrycode',
    'tm_industrycode': 'tm_industrycode',
    'tm_deptcode': 'tm_deptcode',
    'tm_level': 'tm_level',
    'register_code':'register_code',
    'is_vip':'is_vip'
}

"""
表名：zzh_level

说明：行政级别表
"""
LeveLMap = {
    'LeveLId': 'level_id',
    'LeveLName': 'level_name',
    'LeveLCode': 'level_code'
}


"""

映射视图  iew_viewItem_and_reportCar，35个字段，简单来说就是通过report_api传入的userId查询到符合条件的item_id
用于提供查询某个用户的申报车里面的项目（类似于购物车的商品）
"""
viewItemAndReportCarMap = {
    'itemId': 'item_id',
    'itemHandlername': 'item_handlername',
    'itemHandlerphone': 'item_handlerphone',
    'itemTitle': 'item_title',
    'itemPricerange': 'itemPricerange',

    'itemContent': 'item_content',
    'itemUrl': 'item_url',
    'itemDeadline': 'item_deadline',
    'itemPublishdate': 'itemPublishdate',
    'itemAddress': 'item_address',

    'itemStatus': 'item_status',
    'serviceId': 'service_id',
    'serviceName': 'service_name',
    'serviceCode': 'service_code',
    'servicePrice': 'service_price',

    'serviceRate': 'service_rate',
    'serviceStatus': 'service_status',
    'serviceContent': 'service_content',
    'serviceContract': 'service_contract',
    'serviceStartdate': 'service_startdate',

    'serviceEnddate': 'service_enddate',
    'deptId': 'dept_id',
    'deptName': 'dept_name',
    'deptPcode': 'dept_pcode',
    'deptCode': 'dept_code',

    'deptIsLock': 'dept_is_lock',
    'deptSort': 'dept_sort',
    'deptAddress': 'dept_address',
    'leveCode': 'leve_code',
    'provinceId': 'province_id',

    'cityId': 'city_id',
    'districtId': 'district_id',
    'carId': 'cart_id',
    'userId': 'user_id',
    'carStatus': 'cart_status'

}


"""
viewUser_userRecharge_payment
视图
从此视图之中可以查询到指定用户的所有充值记录和支付记录
"""
ViewUserAndRechargeAndPaymentMap = {
             'userName':'user_name',
             'userPhone':'user_phone',
             'userEmail':'user_email',
             'userNickName':'user_nick_name',
             'userStatus':'user_status',

             'userRegIp':'user_reg_ip',
             'userRegTime':'user_reg_time',
             'userAvatar':'user_avatar',
             'memberId':'member_id',
             'userId':'user_id',

             'invited_code':'invited_code',
             'member_code':'member_code',
             'member_name':'member_name',
             'member_email':'member_email',
             'member_points':'member_points',


             'member_balance':'member_balance',
             'member_expired':'member_expired',
             'industry_id':'industry_id',  ######
             'province_id':'province_id',
             'city_id':'city_id',


             'district_id':'district_id',
             'member_favorite_count':'member_favorite_count',
             'member_address':'member_address',
             'member_busness':'member_busness',
             'member_type':'member_type',

             'sp_knowledge':'sp_knowledge',
             'sp_revenue':'sp_revenue',
             'sp_employee':'sp_employee',
             'sp_industrycode':'sp_industrycode',
             'tm_industrycode':'tm_industrycode',


             'tm_deptcode':'tm_deptcode',
             'tm_level':'tm_level',
             'id':'id',
             'rechargeNumber':'recharge_no',
             'amount':'amount',

             'status':'status',
             'creatTime':'create_time',
             'completeTime':'complete_time',
             'paymentId':'payment_id',
             'paymentName':'payment_name',

             'paymentImgUrl':'payment_img_url',
             'paymentRemark':'payment_remark',
             'paymentType':'payment_type',
             'paymentPoundageType':'payment_poundage_type',
             'paymentPoundageAmount':'payment_poundage_amount',

             'paymentSort':'payment_sort',
             'paymentIsLock':'payment_is_lock',
             'paymentApiPath':'payment_api_path'

}


"""
viewUser_pointLog
视图
用于查询某个用户的积分
"""
viewUserAndPointLogMap = {
             'userName':'user_name',
             'userPhone':'user_phone',
             'userEmail':'user_email',
             'userNickName':'user_nick_name',
             'userStatus':'user_status',

             'userRegIp':'user_reg_ip',
             'userRegTime':'user_reg_time',
             'userAvatar':'user_avatar',
             'memberId':'member_id',
             'userId':'user_id',

             'invited_code':'invited_code',
             'member_code':'member_code',
             'member_name':'member_name',
             'member_email':'member_email',
             'member_points':'member_points',


             'member_balance':'member_balance',
             'member_expired':'member_expired',
             'industry_id':'industry_id',  ######
             'province_id':'province_id',
             'city_id':'city_id',


             'district_id':'district_id',
             'member_favorite_count':'member_favorite_count',
             'member_address':'member_address',
             'member_busness':'member_busness',
             'member_type':'member_type',

             'sp_knowledge':'sp_knowledge',
             'sp_revenue':'sp_revenue',
             'sp_employee':'sp_employee',
             'sp_industrycode':'sp_industrycode',
             'tm_industrycode':'tm_industrycode',


             'tm_deptcode':'tm_deptcode',
             'tm_level':'tm_level',

             'id': 'id',
             'point_item_name': 'point_item_name',
             'point_value': 'point_value',

             'remark': 'remark',
             'is_income': 'is_income',
             'create_time': 'create_time'

}


"""
view_user映射
"""
viewUserMap ={

    "userId": "user_id",
    "userName": "user_name",
    "userSalt": "user_salt",
    "userPassword": "user_password",
    "userPhone": "user_phone",

    "userEmail": "user_email",
    "userAvatar": "user_avatar",
    "userNickName": "user_nick_name",
    "userStatus": "user_status",
    "userRegTime": "user_reg_time",
    "userRegIp": "user_reg_ip",

    'memberId': 'member_id',
    'userId': 'user_id',
    'invitedCode': 'invited_code',
    'memberCode': 'member_code',
    'memberCame': 'member_name',

    'memberEmail': 'member_email',
    'memberPoints': 'member_points',
    'memberBalance': 'member_balance',
    'memberExpired': 'member_expired',
    'industryId': 'industry_id',

     'provinceId': 'province_id',
    'cityId': 'city_id',
    'districtId': 'district_id',
    'memberFavoriteCount': 'member_favorite_count',
    'memberAddress': 'member_address',

    'memberBusness': 'member_busness',
    'memberType': 'member_type',
    'spKnowledge': 'sp_knowledge',
    'spRevenue': 'sp_revenue',
    'spEmployee': 'sp_employee',

     'spIndustrycode': 'sp_industrycode',
    'tmIndustrycode': 'tm_industrycode',
    'tmDeptcode': 'tm_deptcode',
    'tmLevel': 'tm_level',
    'registerCode':'register_code',

    #isVip LYM添加
    'isVip':'is_vip'

}